/* Test var scope and tabs */
object test1 {
  def main():Unit = { 
    println(new class1().myMethod(5));
  }
}

class class1 {
  var myVar:Int;
  var myTab:Int[];
  
  def initMyVar():Int = {
    myVar = 0;
    return myVar;
  }
  
  def initMyTab():Int[] = {
    var size:Int;
    var i:Int;
    
    size = 4;
    myTab = new Int[size];
   
    i=0;
    while(i < size) {
      myTab[i] = i;
      i = i+1;
    }
    
    return myTab;
  }
  
  def printMyTab():String = {
    var i:Int;
    
    i=0;  
    while(i < myTab.length) {
      println(myTab[i]);
      i = i+1;
    }
    
    return "";
  }
  
  def incrMyVar():Int = {
    myVar = myVar + 1;
    return myVar;
  }
  
  def myMethod(myVar:Int):String = {
    var msg:String;
    
    println("Scope test");
    println("Property :");
    println(this.initMyVar());
    println("Parameter :");
    println(myVar);
    println("Property :");
    println(this.incrMyVar());
    println("Parameter :");
    println(myVar);
    
    println("");
    println("Tab test");
    println(this.initMyTab().length);
    println(this.printMyTab());
    
    msg = "bonjour";
    {
      println(msg);
    }
    
    return "";
  }
}